package com.youbug.mall.order_oms.service;

import com.youbug.common.to.mq.SeckillOrderTo;
import com.youbug.common.vo.PayVo;
import com.youbug.mall.order_oms.entity.OmsOrder;
import com.baomidou.mybatisplus.extension.service.IService;
import com.youbug.common.vo.QueryVo;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.youbug.mall.order_oms.entity.OmsOrder;
import com.youbug.mall.order_oms.vo.OrderConfirmVo;
import com.youbug.mall.order_oms.vo.OrderSubmitVo;
import com.youbug.mall.order_oms.vo.PayAsyncVo;
import com.youbug.mall.order_oms.vo.SubmitOrderResponseVo;

import java.util.concurrent.ExecutionException;

/**
 * <p>
 * 订单 服务类
 * </p>
 *
 * @author youbug
 * @since 2024-07-09
 */
public interface IOmsOrderService extends IService<OmsOrder> {

    IPage<OmsOrder> getOmsOrderPage(QueryVo<OmsOrder> queryVo);

    OrderConfirmVo confirmOrder() throws ExecutionException, InterruptedException;

    SubmitOrderResponseVo submitOrder(OrderSubmitVo vo);

    void closeOrder(OmsOrder order);

    PayVo getOrderPay(String orderSn);

    OmsOrder getOrderByOrderSn(String orderSn);

    IPage<OmsOrder> getOmsOrderPageWithItem(QueryVo<OmsOrder> queryVo);

    String handlePayResult(PayAsyncVo asyncVo);

    void createSeckillOrder(SeckillOrderTo orderTo);

    IPage<OmsOrder> getOrderListMonthly(QueryVo<OmsOrder> queryVo);
}
